<template>
	<!--公司详情-->
	<view :class="popupShow ? 'all-list' : ''">
		<!-- <baseHead title="企业详情" bg="#171B33" color="#FFF"></baseHead> -->

		<baseHead title="企业详情" color="#FFF" bg="#171B33" :showRightIcon="true" textrightcolor="#fff"
			@clickRightIcon="clickRightIcon">
		</baseHead>

		<view class="boxCla">
			<view class="companyDetailshead" v-if="listdata">
				<view class="company_data fl-t">
					<image class="logo" :src="URL + listdata.LogoPath"></image>
					<view>
						<view class="name">{{ listdata.FullName }}</view>
						<view class="condition">
							{{ listdata.IndustryDesc }}
							<view class="xian" v-if="listdata.IndustryDesc "></view>
							<!-- {{ listdata.CategoryDesc }} -->
							<!-- <view class="xian" v-if="listdata.CategoryDesc"></view> -->
							{{ listdata.SizeDesc }}
							<view class="xian" v-if="listdata.SizeDesc"></view>
							{{listdata.StageDesc}}
						</view>
					</view>
				</view>
			</view>
			<view class="contentnr" v-if="listdata">
				<view v-if="listdata.Description">
					<view class="more">
						<view class="title">企业简介</view>
					</view>
					<view class="">
						<u-read-more ref="uReadMore" showHeight="110" :shadowStyle="shadowStyle" :closeText="closeText"
							:toggle="true">
							<u-parse class="enterpriseProfileclass" :content="listdata.Description"
								@load="load">{{listdata.Description}}</u-parse>
						</u-read-more>
					</view>
				</view>

				<view v-if="qiyefuli.length > 0">
					<view class="more">
						<view class="title">企业福利</view>
					</view>
					<view>
						<view class="fl-w boxview">
							<view class="textnr" v-for="item in qiyefuli" :key="item">
								{{ item }}
							</view>
						</view>
					</view>
				</view>

				<view v-if="videolist">
					<view class="more" @click="clickMoreVideo">
						<view class="title">企业视频</view>
						<view class="title-more">更多
							<u-icon name="arrow-right" color="#fff" size="12"></u-icon>
						</view>
					</view>
					<view class="videoview">
						<view class="videoClass" v-for="(item,index) in videolist" :key="index"
							@click="gotoVideo(item)">
							<image class="imageClass" src="/static/static/images/shipinfengmian.png">
							</image>
							<!-- <image class="top-img" src="/static/static/images/video-file1.png">
							</image> -->
						</view>
					</view>
				</view>

				<view v-if="imgList">
					<view class="more" @click="clickMorePhoto">
						<view class="title">企业相册</view>
						<view class="title-more">更多
							<u-icon name="arrow-right" color="#fff" size="12"></u-icon>
						</view>
					</view>
					<view class="imageBox">
						<view class="imgClass">
							<image v-for="(item, index) in imgList" :key="index" class="preitemimage" v-if="item"
								@click="previewImage(index, imgList)" :src="item" mode="aspectFill">
							</image>
						</view>
					</view>
				</view>

				<template v-if="jinshengtongdao.length > 0">
					<view class="more">
						<view class="title">晋升通道</view>
					</view>
					<view>
						<view class="fl-w boxview">
							<view class="textnr" v-for="item in jinshengtongdao" :key="item">
								{{ item }}
							</view>
						</view>
					</view>
				</template>

				<view class="more" @click="dizhiClick" v-if="listdata.Address">
					<view class="title">公司地址</view>
					<view class="title-more">
						更多
						<u-icon name="arrow-right" color="#fff" size="12"></u-icon>
					</view>
				</view>

				<view class="map" v-if="listdata.Address">
					<map style="width: 100%; height: 100%" :latitude="AddressLatitude" :longitude="AddressLongitude"
						v-show="!popupShow1">
						<cover-view class="flexmap">
							<cover-view class="msaptest">
								{{addrestext}}
							</cover-view>
							<cover-view class="mtestdahoh" @click="dahNavigation">
								<cover-image src="/static/icon/daohang.png" class="icondhs"
									@click="dahNavigation"></cover-image>
								<cover-view class="dhtext" @click="dahNavigation">导航</cover-view>
							</cover-view>
						</cover-view>
					</map>
				</view>
				<!-- <view class="more">
					<view class="title">工商信息</view>
				</view>
				<view class="introduce">
					<view class="introduce-title">
						<view class="introduce-text">公司全称：</view>
						<view>{{listdata.FullName}}</view>
					</view>
					<view class="introduce-title">
						<view class="introduce-text">法定代表人：</view>
						<view>骆大海</view>
					</view>
					<view class="introduce-title">
						<view class="introduce-text">注册资本：</view>
						<view>1000万</view>
					</view>
					<view class="introduce-title">
						<view class="introduce-text">成立日期：</view>
						<view>2014-01-01</view>
					</view>
				</view> -->
				<view class="dibuCla"></view>
			</view>
			<u-empty v-else mode="data" icon="/static/recruit/index/qsy.png" width="350" marginTop="150">
			</u-empty>
		</view>

		<cover-view class="bottom_bar" v-show="btnHidden">
			<cover-view class="but2 " @click="ClickpopupShow">
				在招职位({{ Total }})
			</cover-view>
		</cover-view>

		<!-- 弹出层 -->
		<u-popup backgroundColor="#fff" :duration="duration" :round="10" :show="popupShow" @close="closepopup"
			mode="bottom" class="popupFather">
			<view class="popupcss" id="popupId" :style="{'height':screenHeight+'px','top':topH+'px'}">
				<view class="item1">
					<view class="title"> 在招职位{{ Total }} </view>
					<view class="input-box fl-t">
						<u-search :showAction="true" actionText="搜索" v-model="KeyWord" :animation="true"
							@search="confirmSearch" @clear="clearSearch" @custom="confirmSearch" @focus="getFocus"
							@blur="getBlur">
						</u-search>
					</view>
					<scroll-view class="type-box" style="white-space: nowrap" scroll-x="true">
						<view class="position_name fl-t">
							<view class="fl-c" v-for="(item, index) in PositionType" :key="item.EnCode"
								:class="clickIndex == index ? 'blue' : ''" @click="clickzwType(item, index)">
								{{ item.FullName }}
							</view>
						</view>
					</scroll-view>
				</view>

				<view>
					<fy-dropdown :menuList="menuList">
						<fy-dropdown-item v-model="experienceValue" dropdownKey="experience"
							:options="experienceOptions" @change="handlerTypeChange2"></fy-dropdown-item>
						<fy-dropdown-item v-model="salaryValue" dropdownKey="salary" :options="salaryOptions"
							@change="handlerTypeChange3"></fy-dropdown-item>
						<fy-dropdown-item v-model="xueliValue" dropdownKey="xueli" :options="xueliOptions"
							@change="handlerTypeChange4"></fy-dropdown-item>
					</fy-dropdown>
				</view>

				<scroll-view class="content_d" scroll-y="true" @scrolltolower="ReachBottom" v-if="jobList.length>0">
					<view class="content3" v-for="(item,index) in jobList" :key="item.Id" @click="JobDetails1(item)">
						<view class="fl-lr-c">
							<view class="job_name">{{ item.JobName }}</view>
							<view class="wages" v-if="item.Negotiable">
								面议
							</view>
							<view class="wages" v-else-if="item.MaxWage<=3000">
								{{item.MaxWage/1000}}K以下
							</view>
							<view class="wages" v-else>
								{{ item.MinWage >= 1000 ? item.MinWage / 1000 : item.MinWage }}K~
								{{item.MaxWage >= 1000 ? item.MaxWage / 1000 : item.MaxWage}}K
							</view>
						</view>

						<view class="treatment fl-w">
							<view>{{ item.EducationDesc }}</view>
							<view v-if="item.Student">在校生</view>
							<view v-else-if="item.Graduate">应届生</view>
							<view v-else>{{ item.MinExperience }}~{{ item.MaxExperience }}年经验</view>
							<view>{{ item.EducationDesc }}</view>
							<view>
								{{ item.WorkType == 0 ? "全职"   : item.WorkType == 1 ? "兼职" : item.WorkType == 2 ? "实习"  : ""    }}
							</view>
						</view>
						<view class="company-bottom fl-lr-c">
							<view class="left-company fl-t">
								<image class="logo" :src="URL + item.PublisherHeadIcon" mode="">
								</image>

								<view class="fl-t company-name-box">
									<view class="company-name">
										{{ item.PublisherName ? item.PublisherName+' ': "" }}{{ item.PublisherPost?' · ' +item.PublisherPost:'' }}
									</view>
								</view>
							</view>
							<view class="position_item fl-t">
								<view>{{ item.PcaAddress }}</view>
							</view>
						</view>
					</view>
					<u-loadmore :status="status" v-if="!PositionType.length==0" style="padding-bottom: 100rpx;" />
				</scroll-view>


				<view v-else>
					<u-empty mode="data" icon="/static/recruit/index/qsy.png" width="350" marginTop="100">
					</u-empty>
				</view>

			</view>
		</u-popup>

		<u-popup class="FXpopupCla" :round="10" :show="FXshow" mode="center" @close="FXclose" @open="FXopen">
			<view class="popupContentCla">
				<!-- :style="{'background-image':`url(${URL}${ UserInfo.HeadIcon})`}" -->
				<view class="popupTopCla" id="canvasImg">
					<view class="topConCla">
						<view class="leftBoxCla">
							<view class="leftBoxTop">
								<view class="leftBoxToptouxiang">
									<image src="@/static/zs/hrc-ios-app-ico.png"></image>
								</view>
								<view class="leftBoxTopjieshao">
									<view class="leftBoxTopjieshaoName">
										王麻子
									</view>
									<view class="leftBoxTopjieshaoxinxi">
										女·本科·5年经验
									</view>
								</view>
							</view>
							<view class="leftBoxCenter">
								离职-随时到岗
							</view>
							<view class="leftBoxBottom">
								<span class="span1">意向职位：</span>
								<span class="span2">设计师、前端</span>
							</view>
						</view>
						<view class="rightBoxCla">
							<image class="rightBoxImg" src="@/static/zs/hrc-ios-app-ico.png"></image>
							<image class="rightBoxImg" style="background-color: red;" :src="imgUrl"></image>
							<view class="rightTextCla">长按识别二维码</view>
						</view>
					</view>
				</view>
				<view class="popupBottomCla">
					<u-button type="primary" :plain="true" text="保存图片" @click="canvas.downImg"></u-button>
				</view>
			</view>
			<view class="quxiaoIconCla">
				<image class="quxiaoIconCla1" src="@/static/static/images/quxiaoIcon.png" @click="FXcloseImageClick">
				</image>
			</view>
		</u-popup>

	</view>
</template>


<script module="canvas" lang="renderjs">
	import html2canvas from 'node_modules/html2canvas/dist/html2canvas.js';

	export default {
		data() {
			return {}
		},
		methods: {
			downImg(e, ownerVm) {
				window.scrollTo(0, 0) //注意这里必须设置为顶部不然会出现图片不全
				html2canvas(document.querySelector('#canvasImg'), {
					allowTaint: true, //是否允许跨域图像渲染画布
					useCORS: true, //是否尝试使用 CORS 从服务器加载图像 解决图片跨域问题
				}).then(function(canvas) {
					ownerVm.callMethod('receive', canvas.toDataURL('image/jpeg', 1.0))
					console.log('---------------------', canvas.toDataURL('image/jpeg', 1.0))
				}).catch(err => {
					// ownerVm.callMethod('showToast', `生成图片失败，请重试,${err}`)
				})
			},
		}
	}
</script>

<script>
	import baseHead from "@/pages/component/baseHead.vue";
	import { base64ToPath } from 'node_modules/image-tools/index.js'
	export default {
		data() {
			return {

				context: null, // canvas绘制上下文
				FXshow: false, //分享的弹框
				imgUrl:'',

				URL: this.$config.domain.staticUrl,
				qiyefuli: [],
				jinshengtongdao: [],
				show: false,
				latitude: "",
				longitude: "",
				listdata: {},
				closeText: "查看更多",
				openText: "",
				corpid: null, //企业Id
				popupShow: false, //在招职位
				popupShow1: false, //地图
				id: 0, // 使用 marker点击事件 需要填写id
				title: "map",
				latitude: 106.52,
				longitude: 29.62,
				searchVal: "",
				f_qyid: 0,
				company: "",
				Datacount: 0,
				jobList: [],
				leixing: "",
				clickIndex: -1,
				mapHidden: false, //地图显示
				btnHidden: true, //在职职位按钮
				duration: 300,
				first: true, //首次加载职位
				popupcustomStyle: {
					height: "500px",
				},
				PositionType: [],
				themeColor: "#000000",
				filterResult: "",
				menuList: [{
						title: "经验",
						dropdownKey: "experience",
					},
					{
						title: "薪资",
						dropdownKey: "salary",
					},
					{
						title: "学历",
						dropdownKey: "xueli",
					},
				],
				cityValue: "",
				CityOptions: [],
				experienceValue: "",
				experienceOptions: [],
				salaryValue: "",
				salaryOptions: [],
				xueliValue: "",
				xueliOptions: [],

				pageindex: 1,
				pagesize: 10,
				KeyWord: "", //关键字
				ProvinceCode: "", //工作地点 省
				CityCode: "", //工作地点 市
				AreaCode: "", //工作地点 区
				PositionId: "", //string or null 职位 多个,隔开
				IndustryIds: "", //string or null 行业 多个,隔开
				Wage: "", //薪资待遇 如 3000-5000 参考字典
				Education: "", //string  or null 学历要求 多个,隔开 如2,3 参考字典
				Experience: "", //string  or null 工作经验 多个,隔开 如2,3 参考字典
				WorkType: null, //职位性质 0全职 1兼职 2实习
				JobType: null, //招聘类型 0社招 1校招
				Category: null, //企业性质
				Stage: null, //融资阶段
				Scale: null, //企业规模
				Size: null, //人员规模
				IsVideo: 0, //视频招聘 0 所有 1 视频 2 非视频
				CategoryOne: "", //职位类别第一级 多个,隔开
				status: "loadmore",
				Total: 0, //总数
				pageHeight: '',
				pageTop: "",
				scrollBoxHeight: '',
				viewHeight: '',
				onKeyboardHeight: "",
				isSearch: false, //控制除搜索框显示的
				screenHeight: 0, //屏幕高度
				topH: 0, //距离顶部高度
				shadowStyle: {
					backgroundImage: "none",
				},
				mapshow: false,
			};
		},
		components: {
			baseHead,
			// tuiBottomPopup
		},
		onLoad(option) {
			this.corpid = option.corpId;
		},
		onShow() {
			this.datalist();
			this.searchhotcategory();
		},
		created() {
			// this.inRecruitment();
			const app = getApp()
			// console.log(app.globalData.phoneInformation);
			this.topH = app.globalData.statusBarH + app.globalData.customBarH //状态栏高度
			this.screenHeight = app.globalData.phoneInformation.safeArea.height //屏幕高度
			console.log(this.screenHeight);
			this.zaizhaozhiwei()
		},
		onReachBottom() {},
		computed: {
			AddressLatitude() {
				if (this.listdata.Address) {
					let Latitude = "";
					this.listdata.Address.forEach(res => {
						if (res.IsDefault) {
							Latitude = res.Latitude
						}
					})
					if (!Latitude) {
						Latitude = this.listdata.Address[0].Latitude;
					}
					return Latitude;
				}
			},

			AddressLongitude() {
				if (this.listdata.Address) {
					let Longitude = "";
					this.listdata.Address.forEach(res => {
						if (res.IsDefault) {
							Longitude = res.Longitude
						}
					})
					if (!Longitude) {
						Longitude = this.listdata.Address[0].Longitude;
					}
					return Longitude;
				}
			},
			addrestext() {
				if (this.listdata.Address) {
					let addr = "";
					this.listdata.Address.forEach(res => {
						if (res.IsDefault) {
							addr = res.Address
						}
					})
					if (!addr) {
						addr = this.listdata.Address[0].Address;
					}
					return addr;
				}
			},


			videolist() {
				if (this.listdata.VedioPaths && this.listdata.VedioPaths !== '[]') {
					let srcd = JSON.parse(this.listdata.VedioPaths);
					return srcd.map((res) => {
						return res;
					});
				}
			},
			imgList() {
				if (this.listdata.PhotoPaths && this.listdata.PhotoPaths !== '[]') {
					let srcd = JSON.parse(this.listdata.PhotoPaths);
					return srcd.map((res, index) => {
						return this.URL + res;
					});
				}
			}
		},
		methods: {

			//保存图片
			receive(imageStr) {
				console.log(imageStr,'-----------')
				base64ToPath(imageStr)
				  .then(path => {
				    console.log(path,'======================')
					this.imgUrl = path;
				  })
				  .catch(error => {
				    console.error(error)
				  })
			},

			//打开分享弹框
			FXopen() {},

			//关闭分享弹框
			FXclose() {
				this.FXshow = false;
			},

			//关闭弹窗按钮
			FXcloseImageClick() {
				this.FXshow = false;
			},

			//分享icon点击事件
			clickRightIcon() {

				this.FXshow = true;

				// uni.share({
				//     provider: 'weixin',
				//     scene: "WXSceneSession",
				//     type: 5,
				//     imageUrl: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/share-logo@3.png',
				//     title: '你的好朋友说这家公司提供了不错的工作机会哦~',
				//     miniProgram: {
				//         id: 'gh_73aadddada35',
				//         path: 'pages/launch/index',
				//         type: 2,
				//         webUrl: 'http://uniapp.dcloud.io'
				//     },
				//     success: ret => {
				//         console.log(JSON.stringify(ret));
				//     }
				// });
			},

			// 公司地址更多
			dizhiClick() {
				uni.navigateTo({
					url: `/pages/views/packageA/type-jobhunting/search/qiydizhi?params=${encodeURIComponent(JSON.stringify(this.listdata))}`
				})
			},

			// 点击地图更多里面的 去导航
			clickditu(item) {
				console.log(item);
				let that = this;
				uni.openLocation({
					latitude: Number(item.Latitude),
					longitude: Number(item.Longitude),
					scale: 10,
					name: item.Address,
					success: function() {
						console.log('success');
					},
					fail: function(e) {
						console.log(e);
					}
				})
			},
			dahNavigation() {
				let that = this;
				uni.openLocation({
					latitude: Number(that.AddressLatitude),
					longitude: Number(that.AddressLongitude),
					scale: 10,
					name: that.addrestext,
					success: function() {},
					fail: function(e) {}
				})
			},
			close() {
				this.show = false
				this.popupShow1 = false //地图显示
				this.btnHidden = true //在招职位按钮显示
			},

			//视频跳转
			gotoVideo(item) {
				// console.log(item, '视频跳转')
				let videoUrl = item.VideoPath;
				uni.navigateTo({
					url: '/pages/views/packageA/type-recruit/video/index?item=' + JSON.stringify(videoUrl)
				})
			},
			videoimage(item) {
				if (item.ImgPath) {
					return this.URL + item.ImgPath
				} else {
					return 'https://cdn.uviewui.com/uview/album/1.jpg'
				}
			},
			JobDetails1(item) {
				let id = item.Id
				uni.navigateTo({
					url: `/pages/views/packageA/type-jobhunting/search/JobDetails?id=` + id
				})
				this.showPopupState(false, true)
				this.popupShow = false
			},
			datalist() {
				// let qyid = uni.getStorageSync('dianjiqiye');
				this.$http.huirc
					.corpdetails({
						Id: this.corpid,
					})
					.then((res) => {
						// console.log(res);
						if (res.Success) {
							this.listdata = res.Result;
							this.jsondata()
							this.jsondata1()
						}
					});
			},

			//企业福利
			jsondata() {
				let arr1 = [];
				let arr2 = [];
				let arr3 = [];
				// let arr4 = [];
				arr1 = JSON.parse(this.listdata.Welfares);
				arr2 = JSON.parse(this.listdata.Insurance);
				arr3 = JSON.parse(this.listdata.Benefits);
				this.qiyefuli = [...arr1, ...arr2, ...arr3]
			},
			// 晋升通道
			jsondata1() {
				let arr1 = [];
				let arr2 = [];
				let arr3 = [];
				arr1 = JSON.parse(this.listdata.Promotion);
				arr2 = JSON.parse(this.listdata.Cultivation);
				arr3 = JSON.parse(this.listdata.Encouragement);
				let arr4 = [...arr1, ...arr2, ...arr3]
				this.jinshengtongdao = [...new Set(arr4)]
			},

			Navigation() {
				uni.openLocation({
					latitude: this.latitude,
					longitude: this.longitude,
					success: function() {
						console.log("success");
					},
					fail(e) {
						this.$util.toast("公司经纬度错误");
					},
				});
			},
			previewImage(index, item) {
				uni.previewImage({
					current: index,
					urls: item,
				});
			},
			clickMoreVideo() {
				uni.navigateTo({
					url: "/pages/views/packageA/type-jobhunting/search/qiyshipin?CorpId=" +
						this.corpid,
				});
			},
			clickMorePhoto() {
				uni.navigateTo({
					url: "/pages/views/packageA/type-jobhunting/search/qiytupian?CorpId=" +
						this.corpid,
				});
			},
			// 实时获取展开更多的高度
			load() {
				this.$refs.uReadMore.init();
			},
			// 企业点击更多
			companymore() {
				this.show = true
				this.popupShow1 = true;
				this.btnHidden = false;
			},
			// 打开弹框
			ClickpopupShow() {
				if (!this.FXshow) {
					this.showPopupState(true, false);
					this.popupShow = true;
					this.popupShow1 = true;
					this.show = false;
					this.inRecruitment()
				}
			},
			// 关闭弹框
			closepopup() {
				this.popupShow = false;
				this.popupShow1 = false //地图显示
				this.showPopupState(false, true);
				this.clickIndex = -1;
				this.menuList = [{
						title: "经验",
						dropdownKey: "experience",
					},
					{
						title: "薪资",
						dropdownKey: "salary",
					},
					{
						title: "学历",
						dropdownKey: "xueli",
					},
				];
			},
			// 弹框搜索
			confirmSearch(e) {
				// debugger
				this.KeyWord = e
				this.emty();
				this.inRecruitment();
			},
			// 删除搜索框的搜索
			clearSearch() {
				this.KeyWord = "";
				this.emty();
				this.inRecruitment();
			},
			getFocus() {
				let that = this
				uni.onKeyboardHeightChange(res => {
					console.log("uni.getWindowInfo()", uni.getWindowInfo())
					that.onKeyboardHeight = res.height
					console.log("键盘高度", that.onKeyboardHeight)
				})
			},
			getBlur() {

				// this.pageHeight = this.viewHeight.height + this.onKeyboardHeight + 'px'
				// console.log("this.pageHeight", this.pageHeight);
			},
			// 控制视频隐藏显示的方法
			showPopupState(state, state1) {
				//mapHidden=false显示   btnHidden=true 显示 视频 和 最下方在职按钮
				let that = this;
				if (state) {
					that.mapHidden = true;
				} else {
					setTimeout((res) => {
						that.mapHidden = false;
					}, 200);
				}
				if (state1) {
					that.duration = 200;
					setTimeout((res) => {
						that.btnHidden = true;
					}, 200);
				} else {
					that.btnHidden = false;
					that.duration = 200;
				}
			},

			// 弹框点击分类
			clickzwType(type, index) {
				console.log(type, index);
				if (this.clickIndex == index) {
					this.clickIndex = -1
					this.PositionId = ''
					this.emty();
					this.inRecruitment();
					return;
				}
				this.clickIndex = index;
				this.PositionId = type.EnCode;
				this.emty();

				this.inRecruitment();

			},
			emty() {
				this.pageindex = 1;
				this.pagesize = 10;
				this.jobList = [];
			},
			JobDetails() {},
			// 下拉选择的数据
			result(val) {

				this.filterResult = JSON.stringify(val, null, 2);
			},
			handlerTypeChange(e) {},
			handlerTypeChange2(e) {
				if (e.value == '-1') {
					this.Experience = ''
					this.menuList[0].title = '经验';
				} else {
					this.Experience = e.value;
					this.menuList[0].title = e.label;
				}
				this.emty();
				this.inRecruitment();
			},
			handlerTypeChange3(e) {
				console.log(e);
				if (e.value == '-1') {
					this.Wage = ''
					this.menuList[1].title = '薪资';
				} else {
					this.Wage = e.value;
					this.menuList[1].title = e.label;
				}
				this.emty();
				this.inRecruitment();
			},
			handlerTypeChange4(e) {
				if (e.value == '-1') {
					this.Education = ''
					this.menuList[2].title = '学历';
				} else {
					this.Education = e.value;
					this.menuList[2].title = e.label;
				}
				this.emty();
				this.inRecruitment();
			},
			// 查询企业在招职位
			inRecruitment() {
				let obj = {
					pageIndex: this.pageindex,
					pageSize: this.pagesize,
					KeyWord: this.KeyWord, //关键字
					ProvinceCode: this.ProvinceCode, //工作地点 省
					CityCode: this.CityCode, //工作地点 市
					AreaCode: this.AreaCode, //工作地点 区
					PositionId: this.PositionId, //string or null 职位 多个,隔开
					IndustryIds: this.IndustryIds, //string or null 行业 多个,隔开
					Wage: this.Wage, //薪资待遇 如 3000-5000 参考字典
					Education: this.Education, //string  or null 学历要求 多个,隔开 如2,3 参考字典
					Experience: this.Experience, //string  or null 工作经验 多个,隔开 如2,3 参考字典
					WorkType: this.WorkType, //职位性质 0全职 1兼职 2实习
					JobType: this.JobType, //招聘类型 0社招 1校招
					Category: this.Category, //企业性质
					Stage: this.Stage, //融资阶段
					Scale: this.Scale, //企业规模
					Size: this.Size, //人员规模
					IsVideo: this.IsVideo, //视频招聘 0 所有 1 视频 2 非视频
					CorpId: this.corpid, //职位所属企业ID
					CategoryOne: this.CategoryOne, //职位类别
				};
				this.$http.huirc.jobsearch(obj).then((res) => {

					if (res.Result) {
						this.jobList = this.jobList.concat(res.Result.Items);
						let arr = [];

						let toal = res.Result.Total;
						if (res.Result.Items.length == 0) {
							// 没有数据----
							this.status = "nomore";
							return;
						} else {
							if (res.Result.Items.length <= this.pagesize) {
								// 表示还有数据

								this.pageindex++;
								this.flag = false;
							} else {
								this.status = "nomore";
							}
							// this.flag = true
						}
					}
				});
			},
			// 弹框滑到底后懒加载
			ReachBottom() {
				if (!this.flag) {
					this.inRecruitment();
				}
			},
			zaizhaozhiwei() {
				this.$http.huirc
					.searchhotcategory({
						Id: this.corpid,
					})
					.then((res) => {
						if (res.Result) {
							this.PositionType = res.Result;
							this.PositionType.forEach((item) => {
								this.Total = this.Total + item.JobNumber;
							});
						}
					});
			},
			// 查询职位分类
			searchhotcategory() {
				let sa = {
					label: "不限",
					value: "-1",
				}
				this.$http.dic.DataSelector(385800457572485).then((res) => {
					if (res.Success) {
						let arr = [];
						res.Result.forEach((item) => {
							arr.push({
								label: item.FullName,
								value: item.EnCode,
							});
						});

						arr.unshift(sa)
						this.salaryOptions = arr;
						// console.log(this.salaryOptions);
					}
				});
				// 学历要求
				this.$http.dic.DataSelector(385800548573317).then((res) => {
					if (res.Success) {
						let arr = [];
						res.Result.forEach((item) => {
							arr.push({
								label: item.FullName,
								value: item.EnCode,
							});
						});
						arr.unshift(sa)
						this.xueliOptions = arr;
					}
				});
				// 工作经验
				this.$http.dic.DataSelector(385800643113093).then((res) => {
					if (res.Success) {
						let arr = [];
						res.Result.forEach((item) => {
							arr.push({
								label: item.FullName,
								value: item.EnCode,
							});
						});
						arr.unshift(sa)
						this.experienceOptions = arr;
					}
				});
			},
		},
	};
</script>

<style lang="scss" scoped>
	.FXpopupCla {
		.popupContentCla {
			height: 60vh;
			width: 90vw;

			.popupTopCla {
				height: 85%;
				background-image: url('@/static/zs/hrc-ios-app-ico.png');
				background-repeat: no-repeat;
				background-size: cover;
				border-radius: 10rpx 10rpx 0 0;
				display: flex;
				justify-content: center;
				align-items: end;

				.topConCla {
					width: 85%;
					// height: 257rpx;
					margin-bottom: 31rpx;
					border-radius: 10rpx;
					padding: 30rpx;
					background-color: #ffffff;
					display: flex;

					.leftBoxCla {
						width: 66%;

						.leftBoxTop {
							display: flex;
							align-items: center;

							.leftBoxToptouxiang {
								image {
									border-radius: 49rpx;
									width: 88rpx;
									height: 88rpx;
								}
							}

							.leftBoxTopjieshao {
								margin-left: 20rpx;

								.leftBoxTopjieshaoName {
									font-size: 32rpx;
									font-family: PingFang SC-Bold, PingFang SC;
									font-weight: bold;
									color: #272636;
								}

								.leftBoxTopjieshaoxinxi {
									font-size: 26rpx;
									font-family: PingFang SC-Medium, PingFang SC;
									font-weight: 500;
									color: #666666;
									margin-top: 5rpx;
								}
							}
						}

						.leftBoxCenter {
							font-size: 26rpx;
							font-family: PingFang SC-Medium, PingFang SC;
							font-weight: 500;
							color: #666666;
							margin-top: 29rpx;
						}

						.leftBoxBottom {
							margin-top: 10rpx;

							.span1 {
								font-size: 26rpx;
								font-family: PingFang SC-Medium, PingFang SC;
								font-weight: 500;
								color: #666666;
							}

							.span2 {
								font-size: 26rpx;
								font-family: PingFang SC-Medium, PingFang SC;
								font-weight: 500;
								color: #3476FE;
							}
						}
					}

					.rightBoxCla {
						display: flex;
						flex-direction: column;
						align-items: center;
						flex: 1;
						justify-content: center;
						margin-top: 65rpx;

						.rightBoxImg {
							width: 98rpx;
							height: 98rpx;
						}

						.rightTextCla {
							font-size: 26rpx;
							font-family: PingFang SC-Medium, PingFang SC;
							font-weight: 500;
							color: #999999;
							margin-top: 10rpx;
						}
					}
				}
			}

			.popupBottomCla {
				height: 15%;
				display: flex;
				align-items: end;

				/deep/.u-button {
					width: 194rpx;
					height: 76rpx;
					border-radius: 10rpx;
					border: 1rpx solid #999999;
					font-size: 30rpx;
					font-family: PingFang SC-Bold, PingFang SC;
					font-weight: bold;
					color: #666666;
				}
			}
		}

		.quxiaoIconCla {
			display: flex;
			justify-content: center;

			.quxiaoIconCla1 {
				width: 48rpx;
				height: 48rpx;
				position: absolute;
				margin-top: 106rpx;
			}
		}

	}

	.all-list {
		overflow: hidden;
		position: fixed;
		height: 100%;
		width: 100%;
	}

	.boxCla {
		background-color: #171B33;
		height: 100vh;
	}


	.companyDetailshead {
		height: 260rpx;
		width: 100%;
		background-color: #171B33;
		box-sizing: border-box;
		border-bottom: 2rpx solid #2b2f45;

		.return {
			padding: var(--status-bar-height) 0 70rpx 30rpx;
		}

		.company_data {
			box-sizing: border-box;
			padding: 70rpx 0 20rpx 30rpx;

			.logo {
				width: 128rpx;
				height: 128rpx;
				background: #ffffff;
				border-radius: 10rpx;
				margin-right: 30rpx;
			}

			.name {
				font-size: 46rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #fff;
			}

			.condition {
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #8b8d99;
				padding-top: 20rpx;
				display: flex;
				align-items: center;

				.xian {
					width: 0rpx;
					height: 16rpx;
					opacity: 0.2;
					border: 1rpx solid #707070;
					margin: 0 18rpx;
				}
			}
		}
	}

	.contentnr {
		width: 100%;
		padding: 0 30rpx;
		padding-bottom: 50rpx;
		box-sizing: border-box;
		background-color: #171B33;


		// 企业简介
		.enterpriseProfileclass {
			color: #8b8d99;
		}

		// 图片
		.imageBox {
			flex-wrap: wrap;
			display: flex;
			justify-content: space-between;
			overflow: hidden;
			white-space: nowrap;

			.imgClass {
				flex-shrink: 0;
				width: 48%;
				height: 200rpx;
				box-sizing: border-box;

				.preitemimage {
					width: 100%;
					height: 100%;
					margin-right: 30rpx;
					border-radius: 15rpx;
				}
			}

		}

		// 视频
		.videoview {
			display: flex;
			justify-content: space-between;
			flex-wrap: nowrap;
			overflow: hidden;

			.videoClass {
				width: 48%;
				height: 220rpx;
				flex-shrink: 0;
				position: relative;
				border-radius: 15rpx;
				margin-right: 30rpx;

				.imageClass {
					width: 100%;
					height: 100%;
					border-radius: 15rpx;
				}

				.top-img {
					width: 60rpx;
					height: 60rpx;
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%, -50%);
				}
			}
		}

		.more {
			display: flex;
			justify-content: space-between;
			align-items: center;

			.title {
				padding: 0rpx;
				height: 100%;
				font-family: PingFang SC;
				font-weight: 800;
				color: #fff;
				padding: 50rpx 0 30rpx;
				font-size: 36rpx;
			}

			.title-more {
				display: flex;
				align-items: center;
				font-size: 33rpx;
				color: #fff;
			}
		}

		// 工商信息
		.introduce {
			height: 236rpx;
			padding: 20rpx;
			background-color: #2f3248;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 26rpx;
			border-radius: 20rpx;
			color: #8b8d99;
			line-height: 34rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-around;

			.introduce-title {
				display: flex;

				.introduce-text {
					margin-right: 40rpx;
				}
			}
		}

		.map {
			width: 100%;
			height: 300rpx;
			background: #f2fff6;
			border-radius: 10rpx;
			overflow: hidden;
			position: relative;

			.flexmap {
				position: relative;
				top: 30%;
				width: 100%;
				height: 70rpx;
				box-sizing: border-box;
				display: flex;

				.msaptest {
					margin-left: 2%;
					width: 70%;
					text-align: center;
					line-height: 70rpx;
					padding: 0rpx 10rpx;
					border-radius: 10rpx;
					background-color: rgba(0, 0, 0, 0.5);
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 800;
					color: #ffffff;
					text-overflow: ellipsis;
					/* 超出部分省略号 */
					-webkit-box-orient: vertical;
					/** 设置或检索伸缩盒对象的子元素的排列方式 **/
					-webkit-line-clamp: 1;
					/** 显示的行数 **/
				}

				.mtestdahoh {
					margin-left: 2%;
					width: 20%;
					display: flex;
					justify-content: center;
					text-align: center;
					background-color: #0FCC87;
					border-radius: 70rpx;
					// overflow: hidden;

					.icondhs {
						width: 33rpx;
						height: 33rpx;
						margin: 20rpx 10rpx;
					}

					.dhtext {
						color: #ffffff;
						line-height: 70rpx;
						font-size: 30rpx;
					}
				}

			}
		}

		.dibuCla {
			height: 50rpx;
		}

		.boxview {
			border-radius: 4rpx;
			font-size: 24rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #8b8d99;
			margin: 0 0rpx 20rpx 0;
			// justify-content: space-between;

			.textnr {
				width: 22%;
				border-radius: 10rpx;
				padding: 10rpx 0rpx;
				margin: 10rpx;
				text-align: center;
				background-color: #2f3248;
			}
		}
	}

	// .companyDetailshead {
	// 	height: 300rpx;
	// 	width: 100%;
	// 	background-image: url(/static/image/my/gsbg.png);
	// 	background-size: 100% 100%;
	// 	background-repeat: no-repeat;
	// 	box-sizing: border-box;

	// 	.company_data {
	// 		box-sizing: border-box;
	// 		padding: 70rpx 0 20rpx 30rpx;

	// 		.logo {
	// 			width: 128rpx;
	// 			height: 128rpx;
	// 			background: #ffffff;
	// 			border-radius: 10rpx;
	// 			margin-right: 30rpx;
	// 		}

	// 		.name {
	// 			font-size: 46rpx;
	// 			font-family: PingFang SC;
	// 			font-weight: bold;
	// 			color: #313131;
	// 		}

	// 		.condition {
	// 			font-size: 26rpx;
	// 			font-family: PingFang SC;
	// 			font-weight: 500;
	// 			color: #313131;
	// 			padding-top: 20rpx;
	// 		}
	// 	}
	// }

	// .content {
	// 	width: 100%;
	// 	padding: 0 30rpx;
	// 	box-sizing: border-box;
	// 	background-color: #ffffff;

	// 	.title {
	// 		font-size: 30rpx;
	// 		font-weight: 800;
	// 		color: #313131;
	// 		padding: 30rpx 0;
	// 	}

	// 	.more {
	// 		display: flex;
	// 		justify-content: space-between;
	// 		align-items: center;

	// 		.title-more {
	// 			display: flex;
	// 			font-weight: 400;
	// 			font-size: 30rpx;
	// 			color: #313131;
	// 		}
	// 	}

	// 	// 图片
	// 	.imageBox {
	// 		flex-wrap: wrap;
	// 		display: flex;
	// 		justify-content: space-between;
	// 		overflow: hidden;
	// 		white-space: nowrap;

	// 		.imgClass {
	// 			flex-shrink: 0;
	// 			width: 48%;
	// 			height: 200rpx;
	// 			box-sizing: border-box;

	// 			.preitemimage {
	// 				width: 100%;
	// 				height: 100%;
	// 				margin-right: 30rpx;
	// 				border-radius: 15rpx;
	// 			}
	// 		}

	// 	}

	// 	// 视频
	// 	.videoview {
	// 		display: flex;
	// 		justify-content: space-between;
	// 		flex-wrap: nowrap;
	// 		overflow: hidden;

	// 		.videoClass {
	// 			width: 48%;
	// 			height: 220rpx;
	// 			flex-shrink: 0;
	// 			position: relative;
	// 			border-radius: 15rpx;
	// 			margin-right: 30rpx;

	// 			.imageClass {
	// 				width: 100%;
	// 				height: 100%;
	// 				border-radius: 15rpx;
	// 			}

	// 			.top-img {
	// 				width: 60rpx;
	// 				height: 60rpx;
	// 				position: absolute;
	// 				top: 50%;
	// 				left: 50%;
	// 				transform: translate(-50%, -50%);
	// 			}
	// 		}
	// 	}


	// 	.map {
	// 		width: 100%;
	// 		height: 300rpx;
	// 		background: #f2fff6;
	// 		border-radius: 10rpx;
	// 		overflow: hidden;
	// 		position: relative;

	// 		.flexmap {
	// 			position: relative;
	// 			top: 30%;
	// 			width: 100%;
	// 			height: 70rpx;
	// 			box-sizing: border-box;
	// 			// display: flex;

	// 			.msaptest {
	// 				display: inline-block;
	// 				margin-left: 2%;
	// 				width: 70%;
	// 				text-align: center;
	// 				line-height: 70rpx;
	// 				padding: 0rpx 10rpx;
	// 				border-radius: 10rpx;
	// 				background-color: rgba(0, 0, 0, 0.5);
	// 				font-size: 24rpx;
	// 				font-family: PingFang SC;
	// 				font-weight: 800;
	// 				color: #ffffff;
	// 				text-overflow: ellipsis;
	// 				/* 超出部分省略号 */
	// 				-webkit-box-orient: vertical;
	// 				/** 设置或检索伸缩盒对象的子元素的排列方式 **/
	// 				-webkit-line-clamp: 1;
	// 				/** 显示的行数 **/
	// 			}

	// 			.mtestdahoh {
	// 				height: 100%;
	// 				float: right;
	// 				margin-right: 3%;
	// 				width: 20%;
	// 				// display: flex;
	// 				// justify-content: center;
	// 				text-align: center;
	// 				background-color: #0FCC87;
	// 				border-radius: 70rpx;
	// 				overflow: hidden;
	// 				position: relative;

	// 				.icondhs {
	// 					width: 33rpx;
	// 					height: 33rpx;
	// 					margin: 20rpx 10rpx;
	// 				}

	// 				.dhtext {
	// 					position: relative;
	// 					bottom: 74rpx;
	// 					left: 10rpx;
	// 					color: #ffffff;
	// 					line-height: 70rpx;
	// 					font-size: 30rpx;
	// 				}
	// 			}

	// 		}
	// 	}

	// 	.boxview {
	// 		border-radius: 4rpx;
	// 		font-size: 24rpx;
	// 		font-family: PingFang SC;
	// 		font-weight: 500;
	// 		color: #000000;
	// 		margin: 0 0rpx 20rpx 0;
	// 		// justify-content: space-between;

	// 		.textnr {
	// 			width: 22%;
	// 			border-radius: 10rpx;
	// 			padding: 10rpx 0rpx;
	// 			margin: 10rpx;
	// 			text-align: center;
	// 			background-color: #f7f7f7;
	// 		}
	// 	}
	// }

	.bottom_bar {
		width: 100%;
		height: 88rpx;
		box-sizing: border-box;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		background-color: #fff;
		text-align: center;
		border-radius: 10rpx;

		.but2 {
			width: 100%;

			height: 100%;
			line-height: 78rpx;
			background: #1684fc;
			border-radius: 10rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #ffffff;
			box-sizing: border-box;


		}
	}

	// 弹框
	.popupcss {
		padding: 40rpx 20rpx;
		width: 100%;
		display: flex;
		flex-direction: column;
		border-radius: 10rpx;
		// height: 1200rpx;
		overflow: hidden;
		box-sizing: border-box;
		background-color: #fff;
		position: fixed;
		// top: 100rpx;


		.item1 {
			width: 100%;
			flex-shrink: 0;

			.title {
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #000000;
			}

			.input-box {
				width: 100%;
				height: 64rpx;
				// background: #F7F7F7;
				border-radius: 32rpx;
				margin: 20rpx 0;
				padding: 0 25rpx;
				box-sizing: border-box;

				input {
					flex: 1;
					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #999999;
					box-sizing: border-box;
					padding-left: 20rpx;
				}
			}

			.type-box {
				width: 100%;

				.position_name {
					width: 100%;
					padding-bottom: 20rpx;

					view {
						width: auto;
						height: 54rpx;
						background: #ffffff;
						border: 1px solid #cbcbcb;
						border-radius: 27rpx;
						padding: 28rpx;
						box-sizing: border-box;
						margin-right: 20rpx;
						font-size: 24rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #666666;
					}

					.blue {
						color: #1684fc;
						border: 1px solid #1684fc;
					}

					view:first-of-type {
						margin-left: 0;
					}

					view:last-child {
						margin-right: 0;
					}
				}
			}
		}

		.item2 {}

		.content_d {
			width: 100%;
			display: flex;
			flex: 1;
			height: 1px;
			box-sizing: border-box;

			.content3 {
				width: 100%;
				//margin-top: 20rpx;
				background-color: #fff;
				padding: 30rpx 0 20rpx;
				box-sizing: border-box;
				border-bottom: 1px solid #dee5ef;


				view {
					.job_name {
						font-size: 32rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #000000;
						width: auto;
					}

					.wages {
						font-size: 30rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #f35370;
						width: auto;
					}
				}

				.requirement {
					width: 100%;
					margin: 30rpx 0 20rpx;

					view {
						font-size: 24rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #313131;
						width: auto;
						margin-right: 50rpx;
					}
				}

				.treatment {
					//	border-bottom: 1px solid #DEE5EF;
					padding: 10rpx 0;

					view {
						padding: 14rpx 20rpx;
						font-size: 24rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #666666;
						background: #f7f7f7;
						border-radius: 4rpx;
						margin-right: 20rpx;
						width: auto;
						margin-bottom: 20rpx;
					}
				}

				.company-bottom {
					// padding-top: 24rpx;

					.left-company {
						width: auto;
						height: auto;

						.logo {
							width: 60rpx;
							height: 60rpx;
							flex-shrink: 0;
						}

						.company-name-box {
							height: 60rpx;
							margin-left: 50rpx;
							position: relative;

							.on-line {
								position: absolute;
								width: 12rpx;
								height: 12rpx;
								background: #14c88b;
								border-radius: 50%;
								bottom: 0;
								left: -40rpx;
							}

							.company-name {
								font-size: 24rpx;
								font-family: PingFang SC;
								font-weight: 500;
								color: #999999;
								width: auto;
							}
						}
					}

					.position_item {
						font-size: 24rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #999999;

						view {
							margin-left: 20rpx;
						}
					}
				}
			}
		}
	}
</style>